<template>
  <div style="display: flex; width: 100%; height: 100%;">
    <iframe ref="programFrameRef" class="yy-system-template_list" scrolling="no">

    </iframe>
  </div>
</template>

<script setup lang="ts">
import {defineEmits, onMounted, ref} from "vue";
import {useRoute, useRouter} from "vue-router";
import {EnvConfig, getQueryObject} from '@/utils/index.js'
import StorageUtils from '@/utils/StorageUtils.js'

const router = useRouter()
const route = useRoute()
const $emit = defineEmits({
  //
})

const programFrameRef = ref()
onMounted(() => {
  const routeParams = route.params
  if (EnvConfig.programUrl) {
    programFrameRef.value.setAttribute('src',  EnvConfig.programUrl+ `/#/chart/preview/${routeParams.id}?token=` + StorageUtils.getUserLoginToken())
  }
})

</script>
<style scoped lang="scss">
  .yy-system-template_list {
    width: 100%;
    height: 100%;
    border: 0;
  }
</style>